package com.mswork.mes.controller;

import com.mswork.common.core.controller.BaseController;
import com.mswork.common.core.domain.AjaxResult;
import com.mswork.mes.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mes/user")
public class UserController extends BaseController {

    @Autowired
    private IUserService userService;

    @GetMapping("/list/driver")
    public AjaxResult getDriverList() {
        return AjaxResult.success(userService.getDriverList());
    }

    @GetMapping("/list")
    public AjaxResult getUserList() {
        return AjaxResult.success(userService.getUserList());
    }

    @GetMapping("/getRole")
    public AjaxResult getRole() {
        return success(userService.getRole());
    }
}
